import request from "../request";
import type { FlashListParams } from "@/types/global";

interface FlashListItem {
  pageNum: number;
  pageSize: number;
  totalPage: number;
  total: number;
  list: FlashList[];
}

interface FlashList {
  id: number;
  title: string;
  startDate: string;
  endDate: string;
  status: number;
  createTime: string;
}

export const getFlashList = (data?: FlashListParams): Promise<FlashListItem> =>
  request.get("/flash/list", { params: data });

// /flash/delete/{id}  删除活动
export const Flashdelete = (id: number) => request.post(`/flash/delete/${id}`);
